/******************************************************************/
/*                                                                */
/*  Winpooch : Windows Watchdog                                   */
/*  Copyright (C) 2004  Benoit Blanchon                           */
/*                                                                */
/*  This program is free software; you can redistribute it        */
/*  and/or modify it under the terms of the GNU General Public    */
/*  License as published by the Free Software Foundation; either  */
/*  version 2 of the License, or (at your option) any later       */
/*  version.                                                      */
/*                                                                */
/*  This program is distributed in the hope that it will be       */
/*  useful, but WITHOUT ANY WARRANTY; without even the implied    */
/*  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR       */
/*  PURPOSE.  See the GNU General Public License for more         */
/*  details.                                                      */
/*                                                                */
/*  You should have received a copy of the GNU General Public     */
/*  License along with this program; if not, write to the Free    */
/*  Software Foundation, Inc.,                                    */
/*  675 Mass Ave, Cambridge, MA 02139, USA.                       */
/*                                                                */
/******************************************************************/

#ifndef _LANGUAGE_H
#define _LANGUAGE_H

#include <windows.h>

/**
 * Message sent when language is changed.
 */
#define WM_LANGUAGECHANGED  (WM_USER+3)

/**
 * Maximum length of a language name.
 */
#define MAX_LANGUAGE_NAME	32

/**
 * Language string identifiers.
 */
typedef enum {

  // specials
  _LANGUAGE_NAME_IN_ENGLISH=0x000000,
  _LANGUAGE_NAME,
  _ALERTS_FILE_NAME,
  _ADVICES_FILE_NAME,

  // miscellaneous
  _ABOUT_CONTENT_S=0x010000,
  _ALREADY_RUNNING,

  // menu items
  _ABOUT=0x020000,
  _SHUTDOWN,
  _DISABLE,
  _ENABLE,
  _VIEW_LOG, 
  _WEB_SITE,
  _REPORT_A_BUG,
  _CONFIGURATION,

  // errors
  _FAILED_TO_WATCH_DIRECTORY_S=0x030000,
  _INVALID_ROOT_KEY_OF_S,
  _INVALID_KEY_S, 

  // "last alerts" window
  _LAST_ALERTS=0x060000,
  _DESCRIPTION,
  _ADVICE,
  _TIME,

  // configuration dialog
  _LANGUAGE=0x070000,
  _CHECK_FOR_UPDATES,
  _LAUNCH_AT_STARTUP,
  _ENABLE_PICTURE,
  _ENABLE_SOUND,
  _GENERAL,
  _MAX_LOG_FILE_SIZE,
  _KILOBYTES,

} STRID ;

/**
 * Macro to retreive string.
 */
#define STR(X) (Language_GetString(X))

/**
 * Initialize language module.
 */
BOOL Language_Init () ;

/**
 * Uninitialize language module.
 */
VOID Language_Uninit () ;

/**
 * Set HWND that will receive WM_LANGCHANGED
 */
VOID Language_SetHwnd (HWND) ;

/**
 * Load a new language.
 */
BOOL Language_LoadByName (LPCTSTR szName) ;

/**
 * Load a new language.
 */
BOOL Language_LoadByIndex (int i) ;

/**
 * Load a new language.
 */
BOOL Language_LoadByFile (LPCTSTR szPath) ;

/**
 * Retreive a string.
 */
LPCTSTR Language_GetString (STRID id) ;

/**
 * Retreive a language name in list.
 */
LPCTSTR Language_GetLanguage (int i) ;

/**
 * Retreive language count.
 */
int Language_GetLanguageCount () ;

#endif
